<?php
/*
 * 题目表格的自动验证和自动填充
 * 作者:Tobey
 * */
class questionModel{
    /**
     * 自动验证
     */
    public $validate = array(
        /**
         * 新增题目的时候进行验证    1   3表示修改的时候也验证
         */
        array("que_type",array(0,1,2,3,4),"题目类型只有判断,单选,多选,填空,问答!","in",1,1),
        array("que_content","require","题目内容不能为空!","regex",1,3),
        // array("que_answer","require","题目答案不能为空!","regex",1,3),
        array("que_score",array(1,100),"题目分数范围在1-100的正整数!","between",1,3),
        );

    /*
     * 自动填充
     * */
    public $auto = array(
        /*
         * 1表示新增的时候进行自动填充
         * */
        // array("sex","fill","男",1),            //性别自动男
        );

}